<template>
	<view>
		<scroll-view scroll-x="true" scroll-y="true" class="scroll-xy">
			<iframe :src="iframeUrl" scrolling="no" frameborder="0"
		              height="100%" width="100%" >
			</iframe>
		</scroll-view>
	</view>
</template>

<script>
import getDateTime from '@/common/getdateTime.js';
var thar ;
export default {
	data() {
		return {
			iframeUrl: '',
			// 当前井号
			well_id: '',
			// 当前井名
			well_name:'',
		}
	},
	onLoad(well_id) {
		thar=this;
		this.well_id=well_id.well_id;
		this.init();
	},
	methods: {
		init(){
			/* console.log("....");
			console.log(this.well_id); */
			uni.request({
				//url:"http://127.0.0.1:9011/zsgl/jimu/ScrbbLastDate/"+ thar.well_id,
				url:this.$requestUrl.requestUrl('/zs')+'/app/app/ScrbbLastDate/'+ thar.well_id,
				data:{},
				success: (ref) => {
				var timeStr = getDateTime.dateTimeStr('y-m-d',new Date(ref.data.time));
				this.iframeUrl =this.$requestUrl.requestUrl('/jmbb')+"/jmreport/view/597291466801180672?wellId="+this.well_id+"&time="+timeStr;
				//this.iframeUrl ="http://10.89.67.239:8085/jmreport/view/597291466801180672?wellId="+this.well_id+"&time="+timeStr;
				/* console.log("ggggggggg");
				console.log(this.iframeUrl); */
				},
			})
		},
	},
	
}
</script>


<style>
.scroll-xy{
	width:780rpx;
	height:1160rpx;
}
</style>

